package com.linkoog.devtools.json.toolwindow.ui.jsontree;

import com.fasterxml.jackson.databind.JsonNode;
import lombok.Getter;
import lombok.ToString;

import javax.swing.tree.DefaultMutableTreeNode;

@Getter
@ToString
public class JsonTreeNode extends DefaultMutableTreeNode {

    private final String name;
    private final JsonNode jsonNode;
    private final String json;

    public JsonTreeNode(String name, JsonNode jsonNode) {
        this.name = name;
        this.jsonNode = jsonNode;
        this.json = jsonNode.asText();
    }


}
